from django.shortcuts import render
from django.http import HttpResponse
from django.views import View


class RegView(View):
    def get(self, request):
        return render(request, 'reg.html')


class LogoutView(View):
    def get(self, request):
        return render(request, 'logout.html')


class LoginView(View):
    def get(self, request):
        return render(request, 'login.html')


class HomeView(View):
    def get(self, request):
        return render(request, 'index.html')

    def post(self, request):
        return HttpResponse("这是一个post请求")

    def delete(self, request):
        return HttpResponse("这是一个delete请求")

    def put(self, request):
        return HttpResponse("这是一个put请求")

    def head(self, request):
        return HttpResponse("这是一个head请求")
